#ifndef xpack_meta_seq_tget
#define xpack_meta_seq_tget
#pragma push_macro("xuser")
#undef  xuser
#define xuser mixc::meta_seq_tget::inc
#include"define/base_type.hpp"
#include"macro/xexport.hpp"
#include"meta_seq/tnull.hpp"
#include"meta_seq/tlist.hpp"
#pragma pop_macro("xuser")

namespace mixc::meta_seq_tget{
    template<uxx index_v, class tlist_t>
    struct meta;

    template<uxx index_v, class first_t, class ... args_t>
    struct meta<index_v, inc::tlist<first_t, args_t...>> : meta<index_v - 1, inc::tlist<args_t...>>{
        using result = typename meta<index_v - 1, inc::tlist<args_t...>>::result;
    };

    template<class first_t, class ... args_t>
    struct meta<0, inc::tlist<first_t, args_t...>>{
        using result = first_t;
    };

    template<uxx index_v>
    struct meta<index_v, inc::tlist<>>{
        using result = inc::tnull;
    };

    template<class tlist_t, ixx index_v>
    using tget = typename meta<
        (index_v >= 0) ? index_v : tlist_t::length + uxx(index_v), tlist_t
    >::result;
}

#endif

xexport(mixc::meta_seq_tget::tget)